Skip to content

Conversation

@rampitec
Copy link
Collaborator

@rampitec rampitec commented Nov 4, 2023

At the very least there are no tests covering this. Nothing breaks when I remove it.

At the very least there are no tests covering this. Nothing breaks
when I remove it.
@llvmbot
Copy link
Member

llvmbot commented Nov 4, 2023

@llvm/pr-subscribers-backend-amdgpu

Author: Stanislav Mekhanoshin (rampitec)

Changes

At the very least there are no tests covering this. Nothing breaks when I remove it.


Full diff: https://github.com/llvm/llvm-project/pull/71275.diff

1 Files Affected:

  • (modified) llvm/lib/Target/AMDGPU/SIInstrInfo.cpp (-6)
diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
index d73328d67f6078e..41e53e81046fef1 100644
--- a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
@@ -2776,12 +2776,6 @@ bool SIInstrInfo::isBranchOffsetInRange(unsigned BranchOp,
 
 MachineBasicBlock *SIInstrInfo::getBranchDestBlock(
   const MachineInstr &MI) const {
-  if (MI.getOpcode() == AMDGPU::S_SETPC_B64) {
-    // This would be a difficult analysis to perform, but can always be legal so
-    // there's no need to analyze it.
-    return nullptr;
-  }
-
   return MI.getOperand(0).getMBB();
 }
 

@github-actions
Copy link

github-actions bot commented Nov 4, 2023

✅ With the latest revision this PR passed the C/C++ code formatter.

Copy link
Contributor

@jayfoad jayfoad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is fine if test/CodeGen/AMDGPU/branch-relax* does not hit it.

@rampitec rampitec merged commit c3851a9 into llvm:main Nov 6, 2023
@rampitec rampitec deleted the branch-dest-dead branch November 6, 2023 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants